﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPlus.Master" AutoEventWireup="true" CodeBehind="wbfrm_CuentasPorPagar.aspx.cs" Inherits="FrontEndPlus.Módulos.Inventarios.wbfrm_CuentasPorPagar" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style2
        {
            height: 141px;
            width: 793px;
        }
        .auto-style3
        {
            height: 38px;
            width: 19%;
        }
        .auto-style4
        {
            height: 38px;
            width: 25%;
        }
        .auto-style10
        {
            width: 25%;
            height: 46px;
        }
        .auto-style11
        {
            height: 65px;
        }
        .auto-style12
        {
            height: 38px;
            width: 21%;
        }
        .auto-style13
        {
            height: 38px;
            width: 239px;
        }
        .auto-style14
        {
            width: 11%;
            height: 54px;
        }
        .auto-style18
        {
            width: 11%;
            height: 39px;
        }
        .auto-style19
        {
            width: 70%;
        }
        .auto-style22
        {
            width: 128px;
            height: 54px;
            margin-left: 40px;
        }
        .auto-style23
        {
            width: 128px;
            height: 39px;
        }
        .auto-style24
        {
            width: 100%;
            }
        .auto-style29
        {
            width: 11%;
            height: 18px;
        }
        .auto-style30
        {
            width: 128px;
            height: 18px;
        }
        .auto-style31
        {
        }
        .auto-style33
        {
            width: 799px;
            height: 820px;
        }
        .auto-style34
        {
            height: 459px;
            width: 793px;
        }
        .auto-style35
        {
            width: 86px;
        }
        .auto-style36
        {
            width: 11%;
            height: 78px;
        }
        .auto-style37
        {
            width: 128px;
            height: 78px;
        }
        .auto-style38
        {
            height: 30px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    
<script src="Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui.min.js" type="text/javascript"></script>
    <link href="Scripts/jquery-ui.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript">
        $(function () {
            $("[id$=txt_fecha_pago]").datepicker({

            });
        });
    </script>
    <script type="text/javascript">
        $(function () {
            $("[id$=txt_fecha]").datepicker({

            });
        });
    </script>
</head>
<body>
    <div style="height: 836px; ">
        <table class="auto-style33">
            <tr>
                <td class="auto-style2">
                    <asp:ValidationSummary ID="ValidationSummary1" runat="server" ForeColor="Red" HeaderText="Se han producido los siguientes errores:" />
                    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
                    </asp:ToolkitScriptManager>
                <asp:Panel ID="Panel1" runat="server" GroupingText="Seleccion de Proveedor" Width="765px" Height="124px">
                    <table style="width:100%; height: 77px;">
                        <tr>
                            <td style="height: 55px">
                                <asp:Label ID="Label5" runat="server" Text="Proveedor:"></asp:Label>
                                 <asp:TextBox ID="txt_IDproveedor" runat="server" ReadOnly="True" Height="22px" Width="50px"></asp:TextBox>
                                <asp:ImageButton ID="ib_buscar_proveedor" runat="server" ImageUrl="~/Módulos/Inventarios/Imagenes/icono_lupa.gif" CausesValidation="False" OnClick="ib_buscar_proveedor_Click" style="height: 26px" />
                                
                                <asp:TextBox ID="txt_nombre_proveedor" runat="server" Height="22px" ReadOnly="True" Width="182px"></asp:TextBox>
                                
                                &nbsp;<asp:Label ID="Label6" runat="server" Text="Plazo:"></asp:Label>
                                &nbsp;<asp:TextBox ID="txt_plazo" runat="server" Height="22px" Width="50px" ReadOnly="True"></asp:TextBox>
                                </td>
                        </tr>
                    </table>
                    <br />
                    </asp:Panel>
                    </td>
            </tr>
            <tr>
                <td class="auto-style34">
                    <asp:Label ID="lbl_mensaje" runat="server" BorderColor="Black" ForeColor="Red"></asp:Label>
                    <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Height="483px" Width="789px" OnActiveTabChanged="TabContainer1_ActiveTabChanged" Enabled="False" AutoPostBack="True" OnLoad="TabContainer1_Load">
                        <asp:TabPanel ID="TabPanel1" runat="server" HeaderText="TabPanel1">
                            <HeaderTemplate>
                                Ingreso Cuentas Por Pagar

                            </HeaderTemplate>
                            
                            <ContentTemplate>
                                <asp:Panel ID="Panel4" runat="server" Height="394px" Width="760px">
                                    <table style="width: 100%; height: 369px;">
                                    <tr>                                        
                                        <td align="right" class="auto-style4">
                                            

                                            <asp:Label ID="Label7" runat="server" Text="Fecha:"></asp:Label>
                                            


                                        </td>
                                        

                                        <td align="left" class="auto-style13">
                                            

                                            <asp:TextBox ID="txt_fecha" runat="server" Height="22px" AutoPostBack="True" OnTextChanged="txt_fecha_TextChanged" MaxLength="10" Width="128px"></asp:TextBox>
                                            

                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txt_fecha" ErrorMessage="Seleccione una Fecha" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            

                                            <asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txt_fecha" ErrorMessage="Digite en formato de fecha" ForeColor="Red" Operator="DataTypeCheck" SetFocusOnError="True" Type="Date">*</asp:CompareValidator>
                                            

</td>
                                        

                                        <td align="right" class="auto-style12">
                                            

                                            <asp:Label ID="Label8" runat="server" Text="No. Factura:"></asp:Label>
                                            

                                        </td>
                                        

                                        <td align="left" class="auto-style3">
                                            

                                            <asp:TextBox ID="txt_factura" runat="server" ReadOnly="True" style="margin-left: 9px" BackColor="#CCCCCC" Height="22px" Width="128px"></asp:TextBox>
                                            

                                        </td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="right" class="auto-style14">
                                            

                                            <asp:Label ID="Label9" runat="server" Text="Subtotal:"></asp:Label>
                                            


                                        </td>
                                        

                                        <td align="left" colspan="3">
                                            

                                            <asp:TextBox ID="txt_subTotal" runat="server" AutoPostBack="True" OnTextChanged="txt_subTotal_TextChanged" MaxLength="10" Height="22px" Width="128px"></asp:TextBox>
                                            


                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txt_subTotal" ErrorMessage="Digite el subTotal" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            


                                            <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txt_subTotal" ErrorMessage="Digite solo numeros" ForeColor="Red" Operator="DataTypeCheck" SetFocusOnError="True" Type="Double">*</asp:CompareValidator>
                                            


                                            <asp:RangeValidator ID="RangeValidator4" runat="server" ControlToValidate="txt_subTotal" ErrorMessage="Valor fuera del rango permitido" ForeColor="Red" MaximumValue="2147483647" MinimumValue="1" SetFocusOnError="True" Type="Double">*</asp:RangeValidator>
                                            


                                        </td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="right" class="auto-style14">
                                            

                                            <asp:Label ID="Label10" runat="server" Text="Descuento:"></asp:Label>
                                            


                                        </td>
                                        

                                        <td align="left" colspan="3">
                                            

                                            <asp:TextBox ID="txt_descuento" runat="server" AutoPostBack="True" OnTextChanged="txt_descuento_TextChanged" MaxLength="2" Height="22px" Width="128px"></asp:TextBox>
                                            


                                            %<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txt_descuento" ErrorMessage="Digite el Descuento" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            


                                            <asp:CompareValidator ID="CompareValidator3" runat="server" ControlToValidate="txt_descuento" ErrorMessage="Digite solo numeros" ForeColor="Red" Operator="DataTypeCheck" SetFocusOnError="True" Type="Double">*</asp:CompareValidator>
                                            <asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txt_descuento" ErrorMessage="Digite numeros en intervalo de 0-50" ForeColor="Red" MaximumValue="50" MinimumValue="0" SetFocusOnError="True" Type="Double">*</asp:RangeValidator>
                                            


                                        </td>
                                        

                                    </tr>
                                    
                                    <tr>
                                        

                                        <td align="right" class="auto-style14">
                                            

                                            <asp:Label ID="Label11" runat="server" Text="Impuesto:"></asp:Label>
                                            

                                        </td>
                                        

                                        <td align="left" colspan="3">
                                            

                                            <asp:TextBox ID="txt_impuesto" runat="server" AutoPostBack="True" OnTextChanged="txt_impuesto_TextChanged" MaxLength="2" Height="22px" Width="128px"></asp:TextBox>
                                            
                                            %<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txt_impuesto" ErrorMessage="Digite el Impuesto" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            <asp:CompareValidator ID="CompareValidator4" runat="server" ControlToValidate="txt_impuesto" ErrorMessage="Digite solo numeros" ForeColor="Red" Operator="DataTypeCheck" SetFocusOnError="True" Type="Double">*</asp:CompareValidator>
                                            <asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txt_impuesto" ErrorMessage="Digite numeros en intervalo de 0-13" ForeColor="Red" MaximumValue="13" MinimumValue="0" SetFocusOnError="True" Type="Double">*</asp:RangeValidator>
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            
                                            <asp:Button ID="b_agregar_cuenta" runat="server" Height="28px" Text="Agregar" Width="97px" OnClick="b_agregar_cuenta_Click" />
                                            

                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                                                        

                                        </td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="right" class="auto-style10">
                                            

                                            <asp:Label ID="Label12" runat="server" Text="Total:"></asp:Label>
                                            

                                        </td>
                                        

                                        <td align="left" class="auto-style11" colspan="3">
                                            

                                            <asp:TextBox ID="txt_total" runat="server" ReadOnly="True" BackColor="#CCCCCC" AutoPostBack="True" Height="22px" Width="128px"></asp:TextBox>
                                            

                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="txt_total" ErrorMessage="El total no puede estar vacio" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            

                                        </td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="right" class="auto-style14">
                                            

                                            <asp:Label ID="Label13" runat="server" Text="Descripcion:"></asp:Label>
                                            

                                        </td>
                                        

                                        <td align="left" colspan="3">
                                            

                                            <asp:TextBox ID="txt_descripcion" runat="server" Height="42px" Width="307px" MaxLength="50"></asp:TextBox>
                                            

                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txt_descripcion" ErrorMessage="Digite una Descripcion" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            

                                        </td>
                                        

                                    </tr>
                                    

                                </table>

                             </asp:Panel>

                            </ContentTemplate>
                            
                        </asp:TabPanel>
                        <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
                            <HeaderTemplate>
                                
                                Pagos Cuentas Por Pagar Proveedorres

                            </HeaderTemplate>
                            
                            <ContentTemplate>
                                
                                <asp:Panel ID="Panel5" runat="server" Height="394px" Width="760px">
                                <table class="auto-style24">
                                    

                                    <tr>
                                        

                                        <td align="center" class="auto-style11" colspan="2">
                                            



                                            <br />
                                            


                                        </td>
                                        

                                        <td align="center" class="auto-style11" colspan="2">
                                            <asp:Label ID="Label16" runat="server" Text="Aplicable:"></asp:Label>
                                            &nbsp;<asp:TextBox ID="txt_aplicable" runat="server" BackColor="#66CCFF" ReadOnly="True"></asp:TextBox>
                                        </td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="right" class="auto-style18">
                                            

                                            <asp:Label ID="Label14" runat="server" Text="Saldo Total:"></asp:Label>
                                            


                                            <br />
 </td>
                                        

                                        <td class="auto-style23" colspan="2">
                                            

                                            <asp:TextBox ID="txt_saldoTotal" runat="server" ReadOnly="True" BackColor="#CCCCCC" Height="22px" style="width: 128px" Width="128px"></asp:TextBox>
                                            


                                            <br />
                                            

                                        </td>
                                        

                                        <td class="auto-style19" rowspan="3">
                                            

                                            <asp:Panel ID="Panel3" runat="server" Height="160px" ScrollBars="Auto" Width="444px">
                                                &nbsp;
                                                <asp:GridView ID="gv_pagos_proveedores" runat="server" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="0" GridLines="Vertical" Height="82px" PageSize="3" Width="421px" OnRowCommand="gv_pagos_proveedores_RowCommand">
                                                    <AlternatingRowStyle BackColor="Gainsboro" />
                                                    <Columns>
                                                        <asp:CommandField ShowSelectButton="True" />
                                                        <asp:TemplateField HeaderText="Seleccion">
                                                            <ItemTemplate>
                                                                <asp:CheckBox ID="CheckBox1" runat="server" Enabled="False" />
                                                            </ItemTemplate>
                                                            <FooterStyle HorizontalAlign="Center" />
                                                            <ItemStyle HorizontalAlign="Center" />
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="Nuevo Saldo" Visible="False" />
                                                        <asp:BoundField HeaderText="Monto Aplicado" Visible="False" />
                                                    </Columns>
                                                    <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                                                    <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                                                    <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                                                    <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                                                    <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                                                    <SortedAscendingCellStyle BackColor="#F1F1F1" />
                                                    <SortedAscendingHeaderStyle BackColor="#0000A9" />
                                                    <SortedDescendingCellStyle BackColor="#CAC9C9" />
                                                    <SortedDescendingHeaderStyle BackColor="#000065" />
                                                </asp:GridView>
                                            </asp:Panel>
                                            

                                        </td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="right" class="auto-style14">
                                            

                                            <asp:Label ID="Label15" runat="server" Text="Total Cancelar:"></asp:Label>
                                            


                                        </td>
                                        

                                        <td class="auto-style22" colspan="2">
                                            

                                            <asp:TextBox ID="txt_totalAplicar" runat="server" Height="22px" MaxLength="10" AutoPostBack="True" OnTextChanged="txt_totalAplicar_TextChanged" Width="128px"></asp:TextBox>
                                            


                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="txt_totalAplicar" ErrorMessage="Digite el monto a cancelar" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            <asp:CompareValidator ID="CompareValidator6" runat="server" ControlToValidate="txt_totalAplicar" ErrorMessage="Digite solo numeros y no negativos" ForeColor="Red" Operator="DataTypeCheck" SetFocusOnError="True" Type="Double">*</asp:CompareValidator>
                                            


                                        </td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="right" class="auto-style36">

                                            <asp:Label ID="Label17" runat="server" Text="Fecha:"></asp:Label>
                                            
</td>
                                        

                                        <td class="auto-style37" colspan="2">

                                            <asp:TextBox ID="txt_fecha_pago" runat="server" MaxLength="10" AutoPostBack="True" OnTextChanged="txt_fecha_pago_TextChanged" Enabled="False" Height="22px" Width="128px"></asp:TextBox>
                                            


                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="txt_fecha_pago" ErrorMessage="Seleccione una Fecha" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            <asp:CompareValidator ID="CompareValidator5" runat="server" ControlToValidate="txt_fecha_pago" ErrorMessage="Digite en formato de fecha" ForeColor="Red" Operator="DataTypeCheck" SetFocusOnError="True" Type="Date">*</asp:CompareValidator>
                                            


                                        </td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="right" class="auto-style29">

                                            <asp:Label ID="Label18" runat="server" Text="Tipo Pago:"></asp:Label>
                                            
 </td>
                                        

                                        <td class="auto-style30" colspan="2">

                                            <asp:DropDownList ID="ddl_tipoPago" runat="server" Enabled="False" Height="22px" Width="128px">
                                                

                                                <asp:ListItem></asp:ListItem>
                                                

                                                <asp:ListItem>Contado</asp:ListItem>
                                                <asp:ListItem>Cheque</asp:ListItem>
                                                <asp:ListItem>Transferencia</asp:ListItem>
                                                

                                            </asp:DropDownList>
                                            
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="ddl_tipoPago" ErrorMessage="Seleccione el tipo de pago" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            
 </td>
                                        

                                        <td class="auto-style19" rowspan="3">

                                            <asp:Panel ID="Panel2" runat="server" GroupingText="Informacion de Pago" Height="99px" Width="437px">
                                                

                                                <table style="width:97%; height: 54px;">
                                                    

                                                    <tr>
                                                        

                                                        <td class="auto-style35">

                                                            <asp:Label ID="Label20" runat="server" Text="Monto Pagado:"></asp:Label>
                                                            
 </td>
                                                        

                                                        <td>

                                                            <asp:TextBox ID="txt_monto_pagado" runat="server" ReadOnly="True" BackColor="#CCCCCC"></asp:TextBox>
                                                            
 </td>
                                                        

                                                    </tr>
                                                    

                                                    <tr>
                                                        

                                                        <td class="auto-style35">

                                                            <asp:Label ID="Label21" runat="server" Text="# Recibo:"></asp:Label>
                                                            
 </td>
                                                        

                                                        <td>

                                                            <asp:TextBox ID="txt_recibo" runat="server" ReadOnly="True" BackColor="#CCCCCC"></asp:TextBox>
                                                            
 </td>
                                                        

                                                    </tr>
                                                    

                                                </table>
                                                

                                            </asp:Panel>
                                            
 </td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="right" class="auto-style31">

                                            <asp:Label ID="Label19" runat="server" Text="Descripcion:"></asp:Label>
                                            
 </td>
                                        

                                        <td align="right" class="auto-style31" colspan="2">

                                            <asp:TextBox ID="txt_descripcion_pago" runat="server" Width="202px" Height="46px" MaxLength="100" Enabled="False"></asp:TextBox>
                                            
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="txt_descripcion_pago" ErrorMessage="Digite una descripcion del pago" ForeColor="Red" SetFocusOnError="True">*</asp:RequiredFieldValidator>
                                            
</td>
                                        

                                    </tr>
                                    

                                    <tr>
                                        

                                        <td align="center" class="auto-style38">

                                            <asp:Button ID="b_limpiar" runat="server" Text="Limpiar" CausesValidation="False" OnClick="b_limpiar_Click" />
                                            
 </td>
                                        

                                        <td align="center" class="auto-style38" colspan="2">

                                            <asp:Button ID="b_generar" runat="server" Text="Generar" OnClick="b_generar_Click" Enabled="False" style="height: 26px" />
                                            
 </td>
                                        

                                    </tr>
                                    

                                </table>

                                </asp:Panel>

                            </ContentTemplate>
                            
                        </asp:TabPanel>
                    </asp:TabContainer>                    
                    
                </td>
            </tr>
        </table>
    </div>
    
</body>
</html>


</asp:Content>